package com.edu.whu.entity;

import lombok.Data;

@Data
public class UserInfoDto {
    private final String account;
    private final String name;
    private final String password;

    private UserInfoDto(String account, String name, String password) {
        this.account = account;
        this.name = name;
        this.password = password;
    }

    public static class Builder {
        private String account = null;
        private String name = null;
        private String password = null;

        public Builder withAccount(String account) {
            this.account = account;
            return this;
        }

        public Builder withName(String name) {
            this.name = name;
            return this;
        }

        public Builder withPassword(String password) {
            this.password = password;
            return this;
        }

        public UserInfoDto build() {
            return new UserInfoDto(account, name, password);
        }
    }
}
